//
//  SancanTableViewCell.m
//  ThePrivateKitchen
//
//  Created by lirui on 16/1/22.
//  Copyright © 2016年 www.lanou3g.com蓝鸥科技. All rights reserved.
//

#import "SancanTableViewCell.h"

@implementation SancanTableViewCell

- (void)dealloc
{
    [_img release];
    [_name release];
    [_content release];
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if ( self) {
        self.img = [[ UIImageView alloc] init];
        _img.backgroundColor =[ UIColor whiteColor];
        [self.contentView addSubview:_img];
        [_img release];
        
        self.name = [[UILabel alloc] init];
        [self.contentView addSubview:self.name] ;
        _name.textColor = [UIColor whiteColor];
        _name.textAlignment = NSTextAlignmentNatural;
        [_name release];
        self.content = [[ UILabel alloc] init];
        [self.contentView addSubview:_content];
        _content.textColor = [UIColor whiteColor];
        [_content release];
        _content.font = [UIFont systemFontOfSize:15];
        self.playView = [[ UIImageView alloc ] init];
        [self.contentView addSubview:_playView];
        
        self.playView.image =[ UIImage imageNamed:@"iconfont-zhibo@2x"];
         [_img release];
        
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    _img.frame = CGRectMake(20 * WIDTH, HEIGHT*20, self.contentView.frame.size.width - (40 * WIDTH), HEIGHT * 200);
    _name.frame = CGRectMake(30 * WIDTH, HEIGHT * 150, WIDTH *150, HEIGHT*30);
    _content.frame = CGRectMake(30 *WIDTH, HEIGHT*180, WIDTH * 200, HEIGHT*20);
    _playView.frame = CGRectMake(300 * WIDTH, HEIGHT*170, WIDTH*40, HEIGHT*40);
    _playView.center = _img.center;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
